package com.fuyd.pms.background.web.base;

import com.fuyd.pms.entity.account.MerchantUser;
import org.apache.shiro.SecurityUtils;

/**
 * Controller的基类，用来取出Shiro中的当前用户
 * Created by fuyongde on 2016/1/3.
 */
public abstract class BaseController {

    /**
     * 取出Shiro中的当前用户.
     */
    protected MerchantUser getCurrentUser() {
        MerchantUser merchantUser = (MerchantUser) SecurityUtils.getSubject().getPrincipal();
        return merchantUser;
    }

}
